//
//  IComMediator+ChatModuleActions.m
//  ICome
//
//  Created by zhangrongwu on 16/10/9.
//  Copyright © 2016年 iCom. All rights reserved.
//

#import "IComMediator+ChatModuleActions.h"

@implementation IComMediator (ChatModuleActions)
//模块的常量
// action 类名 Mine 模块统一用Mine
NSString * const kIComMediatorTargetChat = @"Chat";
// 类对应方法名
NSString * const kIComNativeFetchChatViewController = @"nativeFetchChatViewController";
// 类对应方法名
NSString * const kIComNativeFetchChatinitWithGroup = @"nativeFetchChatinitWithGroup";


- (UIViewController *)IComMediator_ChatViewController:(NSDictionary *)params {
    UIViewController *viewController = [self performTarget:kIComMediatorTargetChat
                                                    action:kIComNativeFetchChatViewController
                                                    params:params];
    if ([viewController isKindOfClass:[UIViewController class]]) {
        return viewController;
    } else {
        return [[UIViewController alloc] init];
    }
}

- (UIViewController *)IComMediator_ChatinitWithGroup:(NSDictionary *)params{
    UIViewController *viewController = [self performTarget:kIComMediatorTargetChat
                                                    action:kIComNativeFetchChatinitWithGroup
                                                    params:params];
    if ([viewController isKindOfClass:[UIViewController class]]) {
        return viewController;
    } else {
        return [[UIViewController alloc] init];
    }
}

@end
